package com.power.using.mydaggerp.presenter.detail;

import android.support.annotation.NonNull;

import com.power.using.mydaggerp.contract.detail.WeixinDetailContract;
import com.power.using.mydaggerp.model.detail.WeixinDetailModel;

/**
 * Created by 聪明一只哈 on 2019/10/12.
 * Time: 2019/10/12  14:30
 */
public class WeixinDetailPresenter extends WeixinDetailContract.WeixinDetailPresenter{

    @NonNull
    public static WeixinDetailPresenter newInstance() {
        return new WeixinDetailPresenter();
    }


    @Override
    public void loadWeixinChoiceDetail(String url) {
        if(mIView==null){
            return;
        }

        try{
            mIView.showWeixinChoiceDetail(url);
        }catch (Exception e){
            mIView.showNetworkError();
            e.printStackTrace();
        }
    }

    @Override
    protected WeixinDetailContract.IWeixinDetailModel getModel() {
        return WeixinDetailModel.newInstance();
    }

    @Override
    public void onStart() {

    }
}
